package org.example.demo.base;

import com.kfyang.manualgear.annotation.orm.CreateTime;
import com.kfyang.manualgear.annotation.orm.Id;
import com.kfyang.manualgear.annotation.orm.UpdateTime;
import jakarta.persistence.MappedSuperclass;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.Date;

/**
 * entity基类
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@MappedSuperclass
public abstract class BaseEntity {
    @Id
    @jakarta.persistence.Id
    protected Integer id;

    @CreateTime
    protected Date createTime;

    @UpdateTime
    protected Date updateTime;
}
